﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_Companies : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void AddNewCompanyButton_Click(object sender, EventArgs e)
    {
        Session.Remove("companyId");
        Response.Redirect("~/Admin/AddCompany.aspx");
    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        string companyId = GridView1.DataKeys[GridView1.SelectedIndex]["CompanyId"].ToString();
        Session.Add("companyId", companyId);
        Response.Redirect("~/Admin/AddCompany.aspx");
    }
}